
#pragma once

namespace my_set
{
	template<class K>
	class set
	{
		struct KeySet
		{
			const K& operator()(const K& k)
			{
				return k;
			}
		};
	public:
		typedef typename RBTree<K, K, KeySet>::iterator iterator;

		iterator begin() { return _t.begin(); }
		iterator end() { return _t.end(); }
		pair<iterator, bool> insert(const K& k) { return _t.Insert(k); }
		K& operator[](const K& k)
		{
			pair<iterator, bool> ret = insert(k);
			return *(ret.first);
		}

	private:
		RBTree<K, K, KeySet> _t;
	};
}
